--------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  D:\users\llochner\Dropbox\JOINT PROJECTS\JPE_Child_Devp_2020\FINAL_Replication_CLMP_JPE\code\data_cleaning\pred_wage_inst
> rument\logs\education_variables.log
  log type:  text
 opened on:   9 Jul 2025, 13:40:26

. 
. tab educd educ 

          Educational |
 attainment [detailed |                              Educational attainment [general version]
             version] | N/A or no  Nursery s  Grade 5,     Grade 9   Grade 10   Grade 11   Grade 12  1 year of  2 years o |     Total
----------------------+---------------------------------------------------------------------------------------------------+----------
                  N/A |   570,821          0          0          0          0          0          0          0          0 |   570,821 
No schooling complete |   655,973          0          0          0          0          0          0          0          0 |   655,973 
Nursery school to gra |         0  1,243,973          0          0          0          0          0          0          0 | 1,243,973 
         Grade 5 or 6 |         0          0    618,603          0          0          0          0          0          0 |   618,603 
         Grade 7 or 8 |         0          0    810,946          0          0          0          0          0          0 |   810,946 
              Grade 9 |         0          0          0    474,288          0          0          0          0          0 |   474,288 
             Grade 10 |         0          0          0          0    521,569          0          0          0          0 |   521,569 
             Grade 11 |         0          0          0          0          0    492,480          0          0          0 |   492,480 
12th grade, no diplom |         0          0          0          0          0          0    425,896          0          0 |   425,896 
High school graduate  |         0          0          0          0          0          0  3,108,608          0          0 | 3,108,608 
Some college, but les |         0          0          0          0          0          0    786,405          0          0 |   786,405 
1 or more years of co |         0          0          0          0          0          0          0  1,546,876          0 | 1,546,876 
Associate's degree, t |         0          0          0          0          0          0          0          0    622,376 |   622,376 
    Bachelor's degree |         0          0          0          0          0          0          0          0          0 | 1,426,102 
      Master's degree |         0          0          0          0          0          0          0          0          0 |   518,403 
Professional degree b |         0          0          0          0          0          0          0          0          0 |   174,400 
      Doctoral degree |         0          0          0          0          0          0          0          0          0 |    83,747 
----------------------+---------------------------------------------------------------------------------------------------+----------
                Total | 1,226,794  1,243,973  1,429,549    474,288    521,569    492,480  4,320,909  1,546,876    622,376 |14,081,466 


                      |      Educational
          Educational |  attainment [general
 attainment [detailed |       version]
             version] | 4 years o  5+ years  |     Total
----------------------+----------------------+----------
                  N/A |         0          0 |   570,821 
No schooling complete |         0          0 |   655,973 
Nursery school to gra |         0          0 | 1,243,973 
         Grade 5 or 6 |         0          0 |   618,603 
         Grade 7 or 8 |         0          0 |   810,946 
              Grade 9 |         0          0 |   474,288 
             Grade 10 |         0          0 |   521,569 
             Grade 11 |         0          0 |   492,480 
12th grade, no diplom |         0          0 |   425,896 
High school graduate  |         0          0 | 3,108,608 
Some college, but les |         0          0 |   786,405 
1 or more years of co |         0          0 | 1,546,876 
Associate's degree, t |         0          0 |   622,376 
    Bachelor's degree | 1,426,102          0 | 1,426,102 
      Master's degree |         0    518,403 |   518,403 
Professional degree b |         0    174,400 |   174,400 
      Doctoral degree |         0     83,747 |    83,747 
----------------------+----------------------+----------
                Total | 1,426,102    776,550 |14,081,466 

. 
. replace educ = . if educ == 0 // set to missing if NA
(1,226,794 real changes made, 1,226,794 to missing)

. replace educ = 0 if educd ==2 // add cat for no school completed
(655,973 real changes made)

. replace educd = . if educd == 1 // set to missing if NA
(570,821 real changes made, 570,821 to missing)

. gen edl = 0 if inrange(educ,0,5) // < 12
(9,263,634 missing values generated)

. replace edl = 1 if inlist(educ,6) // 12
(4,320,909 real changes made)

. replace edl = 2 if inlist(educ,7,8) // 13-15
(2,169,252 real changes made)

. replace edl = 3 if inlist(educ,10) // 16
(1,426,102 real changes made)

. replace edl = 4 if inlist(educ,11) // 17+
(776,550 real changes made)

. 
. lab define vedl 0 "<12" 1 "12" 2 "13-15" 3 "16" 4 "17+", modify

. lab values edl vedl 

. 
. lab var edl "5-category education variable"

. tab educ

   Educational attainment |
        [general version] |      Freq.     Percent        Cum.
--------------------------+-----------------------------------
      N/A or no schooling |    655,973        4.86        4.86
Nursery school to grade 4 |  1,243,973        9.21       14.06
      Grade 5, 6, 7, or 8 |  1,429,549       10.58       24.64
                  Grade 9 |    474,288        3.51       28.15
                 Grade 10 |    521,569        3.86       32.01
                 Grade 11 |    492,480        3.65       35.66
                 Grade 12 |  4,320,909       31.98       67.64
        1 year of college |  1,546,876       11.45       79.09
       2 years of college |    622,376        4.61       83.70
       4 years of college |  1,426,102       10.56       94.25
      5+ years of college |    776,550        5.75      100.00
--------------------------+-----------------------------------
                    Total | 13,510,645      100.00

. tab educ edl

          Educational |
  attainment [general |             5-category education variable
             version] |       <12         12      13-15         16        17+ |     Total
----------------------+-------------------------------------------------------+----------
  N/A or no schooling |   655,973          0          0          0          0 |   655,973 
Nursery school to gra | 1,243,973          0          0          0          0 | 1,243,973 
  Grade 5, 6, 7, or 8 | 1,429,549          0          0          0          0 | 1,429,549 
              Grade 9 |   474,288          0          0          0          0 |   474,288 
             Grade 10 |   521,569          0          0          0          0 |   521,569 
             Grade 11 |   492,480          0          0          0          0 |   492,480 
             Grade 12 |         0  4,320,909          0          0          0 | 4,320,909 
    1 year of college |         0          0  1,546,876          0          0 | 1,546,876 
   2 years of college |         0          0    622,376          0          0 |   622,376 
   4 years of college |         0          0          0  1,426,102          0 | 1,426,102 
  5+ years of college |         0          0          0          0    776,550 |   776,550 
----------------------+-------------------------------------------------------+----------
                Total | 4,817,832  4,320,909  2,169,252  1,426,102    776,550 |13,510,645 

. 
. * YEARS OF EDUCATION *
. tab educd, gen(edd)

       Educational attainment [detailed |
                               version] |      Freq.     Percent        Cum.
----------------------------------------+-----------------------------------
                 No schooling completed |    655,973        4.86        4.86
              Nursery school to grade 4 |  1,243,973        9.21       14.06
                           Grade 5 or 6 |    618,603        4.58       18.64
                           Grade 7 or 8 |    810,946        6.00       24.64
                                Grade 9 |    474,288        3.51       28.15
                               Grade 10 |    521,569        3.86       32.01
                               Grade 11 |    492,480        3.65       35.66
                 12th grade, no diploma |    425,896        3.15       38.81
            High school graduate or GED |  3,108,608       23.01       61.82
     Some college, but less than 1 year |    786,405        5.82       67.64
1 or more years of college credit, no d |  1,546,876       11.45       79.09
 Associate's degree, type not specified |    622,376        4.61       83.70
                      Bachelor's degree |  1,426,102       10.56       94.25
                        Master's degree |    518,403        3.84       98.09
Professional degree beyond a bachelor's |    174,400        1.29       99.38
                        Doctoral degree |     83,747        0.62      100.00
----------------------------------------+-----------------------------------
                                  Total | 13,510,645      100.00

. 
. gen edyrs = 9 if edd5 ==1 // grade 9
(13,607,178 missing values generated)

. replace edyrs = 10 if edd6 ==1 // grade 10
(521,569 real changes made)

. replace edyrs = 11 if (edd7 ==1) | (edd8 ==1) // grade 11 or 12th grade no diploma
(918,376 real changes made)

. replace edyrs = 12 if (edd9 ==1) | (edd10 ==1) // HS grad or some college but less than a year
(3,895,013 real changes made)

. replace edyrs = 13 if edd11 ==1 // 1 or more years coll
(1,546,876 real changes made)

. replace edyrs = 15 if edd12 ==1 // associate degree
(622,376 real changes made)

. replace edyrs = 16 if edd13 ==1 // college
(1,426,102 real changes made)

. replace edyrs = 17 if edd14 ==1 // masters
(518,403 real changes made)

. replace edyrs = 19 if edd15 ==1 // professional grad
(174,400 real changes made)

. replace edyrs = 20 if edd16 ==1 // phd
(83,747 real changes made)

. 
. lab var edyrs "Years of completed education"

. lab var edl "5-category years of completed education "

. 
. drop edd*

. tab educd edyrs

          Educational |
 attainment [detailed |                                    Years of completed education
             version] |         9         10         11         12         13         15         16         17         19 |     Total
----------------------+---------------------------------------------------------------------------------------------------+----------
              Grade 9 |   474,288          0          0          0          0          0          0          0          0 |   474,288 
             Grade 10 |         0    521,569          0          0          0          0          0          0          0 |   521,569 
             Grade 11 |         0          0    492,480          0          0          0          0          0          0 |   492,480 
12th grade, no diplom |         0          0    425,896          0          0          0          0          0          0 |   425,896 
High school graduate  |         0          0          0  3,108,608          0          0          0          0          0 | 3,108,608 
Some college, but les |         0          0          0    786,405          0          0          0          0          0 |   786,405 
1 or more years of co |         0          0          0          0  1,546,876          0          0          0          0 | 1,546,876 
Associate's degree, t |         0          0          0          0          0    622,376          0          0          0 |   622,376 
    Bachelor's degree |         0          0          0          0          0          0  1,426,102          0          0 | 1,426,102 
      Master's degree |         0          0          0          0          0          0          0    518,403          0 |   518,403 
Professional degree b |         0          0          0          0          0          0          0          0    174,400 |   174,400 
      Doctoral degree |         0          0          0          0          0          0          0          0          0 |    83,747 
----------------------+---------------------------------------------------------------------------------------------------+----------
                Total |   474,288    521,569    918,376  3,895,013  1,546,876    622,376  1,426,102    518,403    174,400 |10,181,150 


                      |  Years of
          Educational | completed
 attainment [detailed | education
             version] |        20 |     Total
----------------------+-----------+----------
              Grade 9 |         0 |   474,288 
             Grade 10 |         0 |   521,569 
             Grade 11 |         0 |   492,480 
12th grade, no diplom |         0 |   425,896 
High school graduate  |         0 | 3,108,608 
Some college, but les |         0 |   786,405 
1 or more years of co |         0 | 1,546,876 
Associate's degree, t |         0 |   622,376 
    Bachelor's degree |         0 | 1,426,102 
      Master's degree |         0 |   518,403 
Professional degree b |         0 |   174,400 
      Doctoral degree |    83,747 |    83,747 
----------------------+-----------+----------
                Total |    83,747 |10,181,150 

. 
. log close 
      name:  <unnamed>
       log:  D:\users\llochner\Dropbox\JOINT PROJECTS\JPE_Child_Devp_2020\FINAL_Replication_CLMP_JPE\code\data_cleaning\pred_wage_inst
> rument\logs\education_variables.log
  log type:  text
 closed on:   9 Jul 2025, 13:40:33
--------------------------------------------------------------------------------------------------------------------------------------
